package com.lanqiao.companymanage.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanqiao.companymanage.entity.Management;
import com.lanqiao.companymanage.mapper.OperatingMessMapper;
import com.lanqiao.companymanage.service.OperatingMessService;
import org.springframework.stereotype.Service;

/**
 * @author 何小棍
 * 经营信息管理与添加
 */
@Service
public class OperatingMessServiceImpl extends ServiceImpl<OperatingMessMapper, Management> implements OperatingMessService {
    /**
     * 分页查询
     */
    @Override
    public Page<Management> listPage(Page<Management> operatingMessPage) {
        return baseMapper.selectPage(operatingMessPage,null);
    }

    /**
     * 根据id查询
     * @param id
     * @return
     */
    @Override
    public Management selectById(Integer id) {
        return baseMapper.selectById(id);
    }

    /**
     * 经营信息管理添加
     * @param operatingMess
     * @return
     */
    @Override
    public int addOperatingMess(Management operatingMess) {
        return baseMapper.insert(operatingMess);
    }

    /**
     * 根据id删除
     */
    @Override
    public int deleteById(Integer id) {
        return baseMapper.deleteById(id);
    }

    /**
     * 根据id修改
     */
    @Override
    public int updateOperatingMess(Management operatingMess) {
        return baseMapper.updateById(operatingMess);
    }
}
